﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<AmazonCommon.Amazon.ECS.Item>" %>

<%@ Import Namespace="AmazonVer3.Controllers" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        <%= Model.ItemAttributes.Title %></h2>
    <br />
    <div class="rightalignedobject">
        <% if (ViewData[VDConstants.SingleVideoPlayer] != null)
           {
               Html.RenderPartial("YouTubeMovie", ViewData[VDConstants.SingleVideoPlayer]);
           } %>
    </div>
    <div class="leftedimage">
        <% if (Model.MediumImage != null)
               Html.RenderPartial("ProductImage", Model.MediumImage); 
        %>
    </div>
    <h4>
        <% if (Model.OfferSummary != null && Model.OfferSummary.LowestNewPrice != null)
           {
        %>
        Our Price:<%=Model.OfferSummary.LowestNewPrice.FormattedPrice%>
        <% } %>
    </h4>
    <% using (Html.BeginForm("Add", "Cart"))
       {%>
    <%= Html.Hidden("ASIN",Model.ASIN) %>
    <%= Html.Hidden("returnUrl",ViewContext.HttpContext.Request.Url.PathAndQuery) %>
    <input type="image" src="/Content/images/addToCart.gif" alt="Add To Cart" />
    <%
       } %>
    Or
    <p>
        <a href='<%= Html.Encode(Model.DetailPageURL) %>' rel="nofollow">
            <img src="../../Content/images/proceedToAmazonCheckout.gif" width="98" height="33"
                alt="Buy Now" /></a>
    </p>
    <% 
        if (Model.CustomerReviews != null)
        {
            Html.RenderPartial("CustomerReviewSummary", Model.CustomerReviews);

        }
        
        
    %>
    <% if (Model.ItemAttributes.Feature != null)
       {
           Html.RenderPartial("Features", Model.ItemAttributes.Feature);
       }  
    %>
    <% 
        if (Model.EditorialReviews != null)
        {
            Html.RenderPartial("EditorialReviewList", Model.EditorialReviews);
        }
    %>
    <% if (Model.Accessories != null)
       {
           Html.RenderPartial("Accessories", Model.Accessories);
       }
    %>
    <% if (Model.CustomerReviews != null)
       {
    %>
    <div class="customerReviewsLargeOuterDiv">
        <iframe id="frame1" width="800" height="600" src="<%= Model.CustomerReviews.IFrameURL  %>"
            scrolling="auto" frameborder="0" class="customerReviewsLargeIframe"></iframe>
    </div>
    <%
       }
    %>
    <% if (Model.CustomerReviews != null)
       { %><%=Html.ActionLink("Customer Reviews For " + Model.ItemAttributes.Title, "List", new
{
    controller = "Review",
    action = "List",
    id = Model.ASIN})%>
    <% } %>
    <% 
        if (Model.BrowseNodes != null)
        {
            Html.RenderPartial("ProductBrowseNodes", Model.BrowseNodes.BrowseNode);
        }
    %>    
    <%-- <% 
        if (Model.SimilarProducts != null)
        {
            Html.RenderPartial("SimilarProducts", Model.SimilarProducts);
        }
    %>--%>    
    <% 
        if (Model.Variations != null)
        {
            Html.RenderPartial("ProductVariations", Model.Variations);
        }
    %>
    
    <%-- <% Html.RenderPartial("SearchInside", Model.SearchInside); %>--%>
    <%-- <% Html.RenderPartial("Offers", Model.Offers); %>--%>
    <%--  <% Html.RenderPartial("ProductAttributes", Model.ItemAttributes); %>--%>
    <a href='<%=string.Format(VDConstants.LiveNewsFormatString,HttpUtility.UrlEncode(Model.ItemAttributes.Title)) %>'>
        <%=Model.ItemAttributes.Title %></a>
</asp:Content>
